/**
 * @file client_controller.cpp
 * @author 王烨
 * @date 2011-01-09
**/

#include "client_controller.h"

using namespace std;

namespace skeleton
{
  ClientController::ClientController()
    :hasError(false)
  {
  }

  void ClientController::Reset()
  {
    hasError = false;
    errorText.clear();
  }

  string ClientController::ErrorText() const
  {
    assert(hasError);
    return errorText;
  }

  ErrorCode ClientController::GetErrorCode() const
  {
    assert(hasError);
    return errorCode;
  }
    
  void ClientController::SetError(ErrorCode errorCode, const string &errorText)
  {
    hasError = true;
    this->errorCode = errorCode;
    this->errorText = errorText;
  }
}

    
